enum Api {
  PostDealerChangeReviewList = '/Api/MF_ManagerFront/MF_Dealer_Adjustment/PostAdjustment_AuditList',
  PostDealerChangeReviewDetail = '/Api/MF_ManagerFront/MF_Dealer_Adjustment/PostAdjustment_AuditDetail',
  PostInformationReviewList = '/Api/MF_ManagerFront/MF_Dealer_Adjustment/PostInfo_AuditList',

  // 信息审核详情
  PostInformationReviewDetail = '/Api/MF_ManagerFront/MF_Dealer_Adjustment/PostInit_InfoAuditDetail',
  // 门店照片审核详情
  PostPhotoReviewDetail = '/Api/MF_ManagerFront/MF_Dealer_Adjustment/PostInit_DoorPhotoAuditDetail',

  // 模板样机审核列表
  PostModuleReviewList = '/Api/MF_ManagerFront/MF_Module/PostModule_AuditList',

  // 设计审核列表
  PostDesignReviewList = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostMedals_AuditList',

  // 门头费用审核列表
  PostDoorMoneyReviewList = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostDoorMoneyAuditList',

  // 专卖店费用审核列表
  PostStoreRenovationReviewList = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostStoreRenovationMoneyAuditList',

  // 其他设计+门头协议+专卖店协议 验收审核列表 三个审核列表都用这一个接口就行，参数传不同即可
  PostAgreementReviewList = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostAgreementAuditList',

  // 加载门头费用审核详细
  PostDoorMoneyReviewDetail = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostDoorMoneyAuditDetail',

  // 加载 ①专卖店费用申请 审核详细 (由 专卖店费用 审核列表进入) + ②专卖店协议验收申请的 详细 （专卖店费用 审核列表的盖章协议回传进入）
  PostStoreRenovationReviewDetail = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostStoreRenovationAuditDetail',

  // 加载 设计审核详细+设计审核的验收页面
  PostDesignReviewDetail = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostStore_Design_AuditDetail',

  // 加载 其他设计验收审核详细 ID=1045的数据好
  PostOtherDesignReviewDetail = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostOtherDesign_AgreementDetail',
  // 加载 门头协议验收审核详细 id=18的数据好
  PostDoorDesignReviewDetail = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostDoorDesign_AgreementDetail',
  // 加载 专卖店协议验收审核详细
  PostStoreDesignReviewDetail = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostStoreRenovationDesign_AgreementDetail',

  // 加载 模块样机/户外/奖牌 3大审核列表的详细 （查看功能）+ 模块样机/户外/奖牌 三大 审核列表的验收申请加载的详细（验收照片上传）
  PostModuleApplyDetail = '/Api/MF_ManagerFront/MF_Module/PostModuleApplayDetail',

  // 户外套装审核列表
  PostOutdoorReviewList = '/Api/MF_ManagerFront/MF_OutdoorSuits/PostOutdoorSuits_AuditList',

  // 奖牌审核列表
  PostMedalsReviewList = '/Api/MF_ManagerFront/MF_Medals/PostMedals_AuditList',

  // 模块验收审核列表
  PostModuleAcceptanceReviewList = '/Api/MF_ManagerFront/MF_Module/PostModule_AcceptanceAuditList',

  // 奖牌验收审核列表
  PostMedalsAcceptanceReviewList = '/Api/MF_ManagerFront/MF_Medals/PostModule_AcceptanceAuditList',

  // 户外验收审核列表
  PostOutdoorAcceptanceReviewList = '/Api/MF_ManagerFront/MF_OutdoorSuits/PostOutdoorSuits_AcceptanceAuditList',

  // 加载 模块样机/户外/奖牌 3大验收审核列表的详细 （查看功能）
  PostModuleAcceptanceDetail = '/Api/MF_ManagerFront/MF_Module/PostModule_AcceptanceDetail',

  // 加载审核过滤条件
  PostAuditFilter = '/Api/MF_ManagerFront/MF_Home/PostAuditFilter',

  // 加载审核列表
  PostAuditList = '/Api/MF_ManagerFront/MF_Home/AuditList',

  // 加载审核进度
  PostReviewProgressInfo = '/Api/MF_ManagerFront/MF_Home/ReviewProgressInfo',

  // 渠道调整新增审核
  PostAdjustmentInsertAudit = '/Api/MF_ManagerFront/MF_Dealer_Adjustment/PostAdjustment_Insert_Audit',

  // 信息维护审核
  PostInformationAudit = '/Api/MF_ManagerFront/MF_Dealer_Adjustment/PostInfo_Applay_Audit',

  // 门店照片维护审核
  PostDoorPhotoAudit = '/Api/MF_ManagerFront/MF_Dealer_Adjustment/PostDoorPhoto_Applay_Audit',

  // 渠道关停, 并转审核
  PostCloseAndShiftAudit = '/Api/MF_ManagerFront/MF_Dealer_Adjustment/MF_Request_Adjustment_Colse_Shift_Audit',

  // 模板样机审核
  PostModuleAudit = '/Api/MF_ManagerFront/MF_Module/PostModule_Audit',

  // 模板样机验收审核
  PostModuleCheckAudit = '/Api/MF_ManagerFront/MF_Module/PostModule_Check_Audit',

  // 户外套装审核
  PostOutDoorAudit = '/Api/MF_ManagerFront/MF_OutdoorSuits/PostOutdoorSuits_Audit',

  // 户外套装验收审核
  PostOutDoorCheckAudit = '/Api/MF_ManagerFront/MF_OutdoorSuits/PostOutdoorSuits_Check_Audit',

  // 奖牌审核
  PostMedalsAudit = '/Api/MF_ManagerFront/MF_Medals/PostMedals_Audit',

  // 奖牌验收审核
  PostMedalsCheckAudit = '/Api/MF_ManagerFront/MF_Medals/PostMedals_Check_Audit',

  // 新增经销商审核
  PostAddDealerAudit = '/Api/MF_ManagerFront/MF_Dealer_Adjustment/PostAdjustment_Insert_Audit',

  // 设计申请审核
  PostStoreDesignAudit = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostStore_Design_Audit',

  // 活动设计验收审核
  PostAgreementAudit = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostAgreement_Audit',

  // 门店动力金/渠道补贴 审核
  PostStoreRenovationAudit = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostStoreRenovationAudit',

  // 门店动力金/渠道补贴 验收审核
  PostAgreementRenovationAudit = '/Api/MF_ManagerFront/MF_Store_Design_Apply/PostAgreement_PowerGold_ChannelSubsidies_Audit',

  // 订单详细
  PostOrderDetail = '/Api/MF_ManagerFront/MF_NewMall_Order/PostOrderDetail',

  // 订单审核
  PostOrderAudit = '/Api/MF_ManagerFront/MF_NewMall_Order/PostRetail_Examine',

  // 撤单
  PostRevoke = '/Api/MF_ManagerFront/MF_Home/PostObjectStateUpdate',

  // 旗舰店审核
  PostFlagshipStoreAudit = '/Api/MF_ManagerFront/MF_Flagship_Specialty_Store/Post_FSS_Audit',

  // 活跃度审核
  PostActiveLevelAudit = '/Api/MF_ManagerFront/MF_Dealer/PostActiveLevelAudit'
}

interface DealerChangeReviewListParams {
  IsFirst: number;
  Level: number;
  ApplayType: number;
  DealerName: string;
  AuditState: number;
  StartTime: number;
  EndTime: number;
  DirectorId: number;
  SalseId: number;
  DealerTerminalId: number;
  TeamId: number;
  SeniorDealerTerminalId: number;
  DealerDivisionId: number;
  RegionalDirectorId: number;
  SalesServiceId: number;
  PageIndex: number;
  PageSize: number;
  IsExtend: boolean;
  PropertyName: string;
  Ascending: boolean;
}

interface DealerChangeReviewDetailParams {
  // 调整主ID 这三个都是列表的字段 带入详细来即可
  AdjustmentId: number;
  // 申请类型
  ApplayTypeId: number;
  // 经销商/门店ID
  DealerId: number;
}

interface InformationReviewListParams {
  IsFirst: boolean;
  SelectType: number;
  Level: number;
  First_DealerName: string;
  Double_DealerName: string;
  DoorName: string;
  AuditState: number;
  StartTime: number;
  EndTime: number;
  IsGoodDoor: boolean;
  DirectorId: number;
  SalseId: number;
  DealerTerminalId: number;
  TeamId: number;
  SeniorDealerTerminalId: number;
  DealerDivisionId: number;
  RegionalDirectorId: number;
  SalesServiceId: number;
  PageIndex: number;
  PageSize: number;
  IsExtend: boolean;
  PropertyName: string;
  Ascending: boolean;
}

interface InformationReviewDetailParams {
  InfoId: number;
}

export function useReviewApi(vm) {
  const getDealerChangeReviewList = (params: DealerChangeReviewListParams) => {
    return vm.$u.post(Api.PostDealerChangeReviewList, params);
  };

  const getDealerChangeReviewDetail = (params: DealerChangeReviewDetailParams) => {
    return vm.$u.post(Api.PostDealerChangeReviewDetail, params);
  };

  const getInformationReviewList = (params: InformationReviewListParams) => {
    return vm.$u.post(Api.PostInformationReviewList, params);
  };

  const getInformationReviewDetail = (params: InformationReviewDetailParams) => {
    return vm.$u.post(Api.PostInformationReviewDetail, params);
  };

  const getPhotoInformationReviewDetail = (params: InformationReviewDetailParams) => {
    return vm.$u.post(Api.PostPhotoReviewDetail, params);
  };

  const getModuleReviewList = (params: {}) => {
    return vm.$u.post(Api.PostModuleReviewList, params);
  };

  const getDesignReviewList = (params: {}) => {
    return vm.$u.post(Api.PostDesignReviewList, params);
  };

  const getDesignReviewDetail = (params: {}) => {
    return vm.$u.post(Api.PostDesignReviewDetail, params);
  };

  const getStoreRenovationReviewList = (params: {}) => {
    return vm.$u.post(Api.PostStoreRenovationReviewList, params);
  };

  const getDoorMoneyReviewList = (params: {}) => {
    return vm.$u.post(Api.PostDoorMoneyReviewList, params);
  };

  const getAgreementReviewList = (params: {}) => {
    return vm.$u.post(Api.PostAgreementReviewList, params);
  };

  const getDoorMoneyReviewDetail = (params = {}) => {
    return vm.$u.post(Api.PostDoorMoneyReviewDetail, params);
  };

  const getStoreRenovationReviewDetail = (params = {}) => {
    return vm.$u.post(Api.PostStoreRenovationReviewDetail, params);
  };

  const getDoorDesignReviewDetail = (params = {}) => {
    return vm.$u.post(Api.PostDoorDesignReviewDetail, params);
  };

  const getStoreDesignReviewDetail = (params = {}) => {
    return vm.$u.post(Api.PostStoreDesignReviewDetail, params);
  };

  const getOtherDesignReviewDetail = (params = {}) => {
    return vm.$u.post(Api.PostOtherDesignReviewDetail, params);
  };

  const getModuleDetail = (params = {}) => {
    return vm.$u.post(Api.PostModuleApplyDetail, params);
  };

  const getOutdoorReviewList = (params = {}) => {
    return vm.$u.post(Api.PostOutdoorReviewList, params);
  };

  const getMedalsReviewList = (params = {}) => {
    return vm.$u.post(Api.PostMedalsReviewList, params);
  };

  const getMedalAcceptanceReviewList = (params = {}) => {
    return vm.$u.post(Api.PostMedalsAcceptanceReviewList, params);
  };

  const getModuleAcceptanceReviewList = (params = {}) => {
    return vm.$u.post(Api.PostModuleAcceptanceReviewList, params);
  };

  const getOutdoorAcceptanceReviewList = (params = {}) => {
    return vm.$u.post(Api.PostOutdoorAcceptanceReviewList, params);
  };

  const getModuleAcceptanceReviewDetail = (params = {}) => {
    return vm.$u.post(Api.PostModuleAcceptanceDetail, params);
  };

  const getAuditFilter = (params = {}) => {
    return vm.$u.post(Api.PostAuditFilter, params);
  };

  const getAuditList = (params = {}) => {
    return vm.$u.post(Api.PostAuditList, params);
  };

  const getProgressInfo = (params: {}) => {
    return vm.$u.post(Api.PostReviewProgressInfo, params);
  };

  // 渠道调整审核
  const insertAdjustmentAduit = (params: {}) => {
    return vm.$u.post(Api.PostAdjustmentInsertAudit, params);
  };

  // 信息维护审核
  const approvalInformation = (params: {}) => {
    return vm.$u.post(Api.PostInformationAudit, params);
  };

  // 门店照片审核
  const approvalDoorPhoto = (params: {}) => {
    return vm.$u.post(Api.PostDoorPhotoAudit, params);
  };

  // 模板样机审核
  const approvalModule = (params: {}) => {
    return vm.$u.post(Api.PostModuleAudit, params);
  };

  // 模板样机验收审核
  const approvalModuleCheck = (params: {}) => {
    return vm.$u.post(Api.PostModuleCheckAudit, params);
  };

  // 户外套装审核
  const approvalOutdoor = (params: {}) => {
    return vm.$u.post(Api.PostOutDoorAudit, params);
  };

  // 户外套装验收审核
  const approvalOutDoorCheck = (params: {}) => {
    return vm.$u.post(Api.PostOutDoorCheckAudit, params);
  };

  // 奖牌审核
  const approvalMedals = (params: {}) => {
    return vm.$u.post(Api.PostMedalsAudit, params);
  };

  // 奖牌验收审核
  const approvalMedalsCheck = (params: {}) => {
    return vm.$u.post(Api.PostMedalsCheckAudit, params);
  };

  // 渠道关停并转审核
  const approvalCloseAndShift = (params: {}) => {
    return vm.$u.post(Api.PostCloseAndShiftAudit, params);
  };

  // 新增经销商审核
  const approvalAddDealer = (params: {}) => {
    return vm.$u.post(Api.PostAddDealerAudit, params);
  };

  // 设计申请审核
  const approvalStoreDesign = (params: {}) => {
    return vm.$u.post(Api.PostStoreDesignAudit, params);
  };

  // 活动设计验收审核
  const approvalAgreement = (params: {}) => {
    return vm.$u.post(Api.PostAgreementAudit, params);
  };

  // 动力金, 渠道补贴审核
  const approvalStoreRenovation = (params: {}) => {
    return vm.$u.post(Api.PostStoreRenovationAudit, params);
  };

  // 动力金, 渠道补贴验收审核
  const approvalAgreementRenovation = (params: {}) => {
    return vm.$u.post(Api.PostAgreementRenovationAudit, params);
  };

  const getOrderDetail = (params: {}) => {
    return vm.$u.post(Api.PostOrderDetail, params);
  };

  const approvalOrder = (params: {}) => {
    return vm.$u.post(Api.PostOrderAudit, params);
  };

  const revoke = (params: {}) => {
    return vm.$u.post(Api.PostRevoke, params);
  };

  const approvalFlagshipStore = (params: {}) => {
    return vm.$u.post(Api.PostFlagshipStoreAudit, params);
  };

  const activeLevelApproval = (params: {}) => {
    return vm.$u.post(Api.PostActiveLevelAudit, params);
  };

  return {
    getDealerChangeReviewList,
    getDealerChangeReviewDetail,
    getInformationReviewList,
    getInformationReviewDetail,
    getPhotoInformationReviewDetail,
    getModuleReviewList,
    getDesignReviewList,
    getDesignReviewDetail,

    getStoreRenovationReviewList,
    getDoorMoneyReviewList,
    getAgreementReviewList,

    getDoorMoneyReviewDetail,
    getStoreRenovationReviewDetail,

    getDoorDesignReviewDetail,
    getStoreDesignReviewDetail,
    getOtherDesignReviewDetail,
    getModuleDetail,

    getOutdoorReviewList,
    getMedalsReviewList,

    getMedalAcceptanceReviewList,
    getModuleAcceptanceReviewList,
    getOutdoorAcceptanceReviewList,

    getModuleAcceptanceReviewDetail,
    getAuditFilter,

    getAuditList,
    getProgressInfo,

    insertAdjustmentAduit,

    approvalInformation,
    approvalDoorPhoto,
    approvalCloseAndShift,

    approvalModule,
    approvalOutdoor,
    approvalMedals,

    approvalMedalsCheck,
    approvalOutDoorCheck,
    approvalModuleCheck,

    approvalAddDealer,
    approvalStoreDesign,
    approvalAgreement,
    approvalStoreRenovation,
    approvalAgreementRenovation,

    getOrderDetail,
    approvalOrder,
    revoke,

    approvalFlagshipStore,

    activeLevelApproval
  };
}
